package com.demo.springboot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletResponse;

@Controller
@ResponseBody
public class PageController {

    @RequestMapping(value = "/")
    public String getIndex(Model model, HttpServletResponse response) {
        System.out.println("hello world");
        return "index";
    }

    @RequestMapping(value = "/hello")
    public String getHello() {
        return "hello";
    }
}
